<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="custom-style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
	<div style="overflow: hidden;">
		<div style="height: 57px;min-width: 1039px;background-size: auto 100%;background:url('');">
			<img src="titleleft.png" style="float: left;"/>
			<img src="titleright.png" alt="" style="float: right;" />
		</div>
	</div>
<!-- 制作者 Doxygen 1.8.15 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>法律声明</span></a></li>
      <li><a href="_xE9_xA6_x96_xE9_xA1_xB5.html"><span>首页</span></a></li>
      <li><a href="_xE6_x9B_xB4_xE6_x96_xB0_xE8_xAE_xB0_xE5_xBD_x95.html"><span>更新记录</span></a></li>
      <li><a href="_xE7_x8E_xAF_xE5_xA2_x83_xE9_x85_x8D_xE7_xBD_xAE.html"><span>环境配置</span></a></li>
      <li><a href="_xE7_xBC_x96_xE7_xA8_x8B_xE5_xBC_x95_xE5_xAF_xBC.html"><span>编程引导</span></a></li>
      <li class="current"><a href="modules.html"><span>接口说明</span></a></li>
      <li><a href="annotated.html"><span>结构体定义</span></a></li>
      <li><a href="_xE7_x9B_xB8_xE6_x9C_xBA_xE5_x8F_x82_xE6_x95_xB0_xE8_x8A_x82_xE7_x82_xB9_xE8_xA1_xA8.html"><span>相机参数节点表</span></a></li>
      <li><a href="examples.html"><span>示例程序</span></a></li>
      <li><a href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html"><span>状态码</span></a></li>
      <li><a href="_xE5_xB8_xB8_xE8_xA7_x81_xE9_x97_xAE_xE9_xA2_x98.html"><span>常见问题</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">事件及异常</div>  </div>
</div><!--header-->
<div class="contents">

<p>包括事件及异常接口  
<a href="#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ga5b0279fd45b9ecdc578bb06ccf1a5f0c"><td class="memItemLeft" align="right" valign="top">MV_CAMCTRL_API int __stdcall&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE5_x8F_x8A_xE5_xBC_x82_xE5_xB8_xB8.html#ga5b0279fd45b9ecdc578bb06ccf1a5f0c">MV_CC_RegisterAllEventCallBack</a> (IN void *handle, IN void(__stdcall *cbEvent)(<a class="el" href="struct_m_v___e_v_e_n_t___o_u_t___i_n_f_o.html">MV_EVENT_OUT_INFO</a> *pEventInfo, void *pUser), IN void *pUser)</td></tr>
<tr class="memdesc:ga5b0279fd45b9ecdc578bb06ccf1a5f0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册全部事件回调，在打开设备之后调用  <a href="#ga5b0279fd45b9ecdc578bb06ccf1a5f0c">更多...</a><br /></td></tr>
<tr class="separator:ga5b0279fd45b9ecdc578bb06ccf1a5f0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef606cb8e2e0bf249ec80ef1255e834b"><td class="memItemLeft" align="right" valign="top">MV_CAMCTRL_API int __stdcall&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE5_x8F_x8A_xE5_xBC_x82_xE5_xB8_xB8.html#gaef606cb8e2e0bf249ec80ef1255e834b">MV_CC_RegisterEventCallBackEx</a> (IN void *handle, IN const char *strEventName, IN void(__stdcall *cbEvent)(<a class="el" href="struct_m_v___e_v_e_n_t___o_u_t___i_n_f_o.html">MV_EVENT_OUT_INFO</a> *pEventInfo, void *pUser), IN void *pUser)</td></tr>
<tr class="memdesc:gaef606cb8e2e0bf249ec80ef1255e834b"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册单个事件回调，在打开设备之后调用  <a href="#gaef606cb8e2e0bf249ec80ef1255e834b">更多...</a><br /></td></tr>
<tr class="separator:gaef606cb8e2e0bf249ec80ef1255e834b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ba31ad90b74fe9a8ce4d4199164ba51"><td class="memItemLeft" align="right" valign="top">MV_CAMCTRL_API int __stdcall&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE4_xBA_x8B_xE4_xBB_xB6_xE5_x8F_x8A_xE5_xBC_x82_xE5_xB8_xB8.html#ga5ba31ad90b74fe9a8ce4d4199164ba51">MV_CC_RegisterExceptionCallBack</a> (IN void *handle, IN void(__stdcall *cbException)(unsigned int nMsgType, void *pUser), IN void *pUser)</td></tr>
<tr class="memdesc:ga5ba31ad90b74fe9a8ce4d4199164ba51"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册异常消息回调，在打开设备之后调用  <a href="#ga5ba31ad90b74fe9a8ce4d4199164ba51">更多...</a><br /></td></tr>
<tr class="separator:ga5ba31ad90b74fe9a8ce4d4199164ba51"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<p>包括事件及异常接口 </p>
<h2 class="groupheader">函数说明</h2>
<a id="ga5b0279fd45b9ecdc578bb06ccf1a5f0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5b0279fd45b9ecdc578bb06ccf1a5f0c">&#9670;&nbsp;</a></span>MV_CC_RegisterAllEventCallBack()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MV_CAMCTRL_API int __stdcall MV_CC_RegisterAllEventCallBack </td>
          <td>(</td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN &#160;</td>
          <td class="paramname"><em>void</em>__stdcall *cbEvent)(MV_EVENT_OUT_INFO *pEventInfo, void *pUser, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>pUser</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册全部事件回调，在打开设备之后调用 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>[IN] 设备句柄 </td></tr>
    <tr><td class="paramname">cbEvent</td><td>[IN] 事件回调函数指针 </td></tr>
    <tr><td class="paramname">pUser</td><td>[IN] 用户自定义变量 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">MV_OK</a>；失败，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">错误码</a> </dd></dl>
<dl class="section note"><dt>注解</dt><dd><b>&#160;&bull;&#160;</b>通过该接口设置事件回调，可以在回调函数里面获取采集、曝光等事件信息。 <br />
 <b>&#160;&bull;&#160;</b>该接口不支持CameraLink设备。<br />
</dd></dl>

</div>
</div>
<a id="gaef606cb8e2e0bf249ec80ef1255e834b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef606cb8e2e0bf249ec80ef1255e834b">&#9670;&nbsp;</a></span>MV_CC_RegisterEventCallBackEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MV_CAMCTRL_API int __stdcall MV_CC_RegisterEventCallBackEx </td>
          <td>(</td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN const char *&#160;</td>
          <td class="paramname"><em>strEventName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN &#160;</td>
          <td class="paramname"><em>void</em>__stdcall *cbEvent)(MV_EVENT_OUT_INFO *pEventInfo, void *pUser, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>pUser</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册单个事件回调，在打开设备之后调用 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>[IN] 设备句柄 </td></tr>
    <tr><td class="paramname">strEventName</td><td>[IN] 事件名称 </td></tr>
    <tr><td class="paramname">cbEvent</td><td>[IN] 事件回调函数指针 </td></tr>
    <tr><td class="paramname">pUser</td><td>[IN] 用户自定义变量 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">MV_OK</a>；失败，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">错误码</a> </dd></dl>
<dl class="section note"><dt>注解</dt><dd><b>&#160;&bull;&#160;</b>通过该接口设置事件回调，可以在回调函数里面获取采集、曝光等事件信息。<br />
 <b>&#160;&bull;&#160;</b>该接口不支持CameraLink设备。 </dd></dl>
<dl class="section examples"><dt>示例</dt><dd><a class="el" href="_events_8cpp-example.html#a31">Events.cpp</a>.</dd>
</dl>

</div>
</div>
<a id="ga5ba31ad90b74fe9a8ce4d4199164ba51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5ba31ad90b74fe9a8ce4d4199164ba51">&#9670;&nbsp;</a></span>MV_CC_RegisterExceptionCallBack()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MV_CAMCTRL_API int __stdcall MV_CC_RegisterExceptionCallBack </td>
          <td>(</td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN &#160;</td>
          <td class="paramname"><em>void</em>__stdcall *cbException)(unsigned int nMsgType, void *pUser, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IN void *&#160;</td>
          <td class="paramname"><em>pUser</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>注册异常消息回调，在打开设备之后调用 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>[IN] 设备句柄 </td></tr>
    <tr><td class="paramname">cbException</td><td>[IN] 异常回调函数指针 </td></tr>
    <tr><td class="paramname">pUser</td><td>[IN] 用户自定义变量 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">MV_OK</a>；失败，返回<a class="el" href="_xE9_x94_x99_xE8_xAF_xAF_xE7_xA0_x81.html">错误码</a> </dd></dl>
<dl class="section note"><dt>注解</dt><dd><b>&#160;&bull;&#160;</b>该接口需要在 <a class="el" href="group___xE7_x9B_xB8_xE6_x9C_xBA_xE5_x88_x9D_xE5_xA7_x8B_xE5_x8C_x96.html#ga308c9a9869be7a457d27aadd94ce57dd" title="打开设备">MV_CC_OpenDevice()</a> 打开设备之后调用。<br />
 <b>&#160;&bull;&#160;</b>设备异常断开连接后可以在回调里面获取到异常消息，GigE设备掉线之后需要先调用 <a class="el" href="group___xE7_x9B_xB8_xE6_x9C_xBA_xE5_x88_x9D_xE5_xA7_x8B_xE5_x8C_x96.html#ga33853bd328f46492102246ca8b645d57" title="关闭设备">MV_CC_CloseDevice()</a> 接口关闭设备，再调用 <a class="el" href="group___xE7_x9B_xB8_xE6_x9C_xBA_xE5_x88_x9D_xE5_xA7_x8B_xE5_x8C_x96.html#ga308c9a9869be7a457d27aadd94ce57dd" title="打开设备">MV_CC_OpenDevice()</a> 接口重新打开设备。 <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadCenter">宏定义  </th><th class="markdownTableHeadCenter">宏定义值  </th><th class="markdownTableHeadCenter">含义   </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyCenter"><a class="el" href="group___xE5_xAE_x8F_xE5_xAE_x9A_xE4_xB9_x89.html#gabc7a5d3d85a08c80642bd526db563aa4">MV_EXCEPTION_DEV_DISCONNECT</a>  </td><td class="markdownTableBodyCenter">0x00008001  </td><td class="markdownTableBodyCenter">设备断开连接   </td></tr>
</table>
</dd></dl>
<dl class="section examples"><dt>示例</dt><dd><a class="el" href="_reconnect_demo_8cpp-example.html#a33">ReconnectDemo.cpp</a>.</dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<div class="footer" style="text-align: right;">
	<hr/>
	<small></small>
</div>
<script>
	// 当前选中的菜单
	var currentMenuItem = document.querySelector('.tablist > li.current > a')
	if (currentMenuItem) { // 子菜单情况
	  window.parent.postMessage({
		navHref: currentMenuItem.href
	  }, '*')
	} else {
	  window.parent.postMessage({
		url: window.location.href
	  }, '*')
	}
  </script>
</body>
</html>